import request from '@/utils/request'

// 问题意见
export function fetchList(query) {
  return request({
    url: '/admin/questions',
    method: 'get',
    params: query
  })
}

// 已读
export function fetchRead(id) {
  return request({
    url: `/admin/questions/${id}/read`,
    method: 'put'
  })
}

// 全部已读
export function fetchReadAll() {
  return request({
    url: `/admin/questions/readall`,
    method: 'put'
  })
}

// 删除
export function fetchDelete(id) {
  return request({
    url: `/admin/questions/${id}`,
    method: 'delete'
  })
}

